package ysm.controller.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.entity.College;
import ysm.service.CollegeService;

@RestController
@RequestMapping("/public")
public class CollegeController {
	
	@Autowired
	private CollegeService collegeService;
	
	@RequestMapping("/loadAllCollege")
	public List loadAllCollege() {
		return collegeService.loadAllCollege();
	}
	
	@RequestMapping("/selectCollegeByPrimaryKey")
	College selectByPrimaryKey(Integer id) {
		return collegeService.selectByPrimaryKey(id);
	}
	
	@RequestMapping("/insertCollege")
	public void insert(College record) {
		collegeService.insert(record);
	}
	
	@RequestMapping("/updateCollegeByPrimaryKey")
	public void updateByPrimaryKey(College record) {
		collegeService.updateByPrimaryKey(record);
	}

}
